package com.lmonkey.servlet.cart;

import com.lmonkey.servic.CARTDao;
import com.lmonkey.shop.CART;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/shangc/cartshopnumadd")
public class CartShopNumAdd extends HttpServlet {
   protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //设置字符集
       request.setCharacterEncoding("UTF-8");
       response.setContentType("text/html;charset=utf-8");
       //获取参数
       String count = request.getParameter("count");
       String id = request.getParameter("esid");
       //进行修改数量
       CARTDao.updatenum(Integer.parseInt(id),Integer.parseInt(count));
    }
}
